From: Glenn Morris Date: Sat, 14 Nov 2009 04:37:00 +0000 (+0000) Subject: (viper-set-hooks): Remove duplicate advice statements for vc-diff, X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~9494 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=c1adb0e6955970ec71b40aab9eaa735ed130d4d5;p=emacs.git (viper-set-hooks): Remove duplicate advice statements for vc-diff, emerge-quit, and rmail-cease-edit. If they are already loaded, eval-after-load will do the right thing. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 24e9ebb3d1e..fcaa469bf87 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2009-11-14 Glenn Morris + * emulation/viper.el (viper-set-hooks): Remove duplicate advice + statements for vc-diff, emerge-quit, and rmail-cease-edit. + If they are already loaded, eval-after-load will do the right thing. + * speedbar.el (top-level): Remove unnecessary load of ange-ftp when compiling. diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index c6194c65bdc..24ed2dc80ba 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -866,25 +866,17 @@ It also can't undo some Viper settings." )) ;; Tell vc-diff to put *vc* in Vi mode - (if (featurep 'vc) - (defadvice vc-diff (after viper-vc-ad activate) - "Force Vi state in VC diff buffer." - (viper-change-state-to-vi)) - (eval-after-load - "vc" - '(defadvice vc-diff (after viper-vc-ad activate) - "Force Vi state in VC diff buffer." - (viper-change-state-to-vi)))) + (eval-after-load + "vc" + '(defadvice vc-diff (after viper-vc-ad activate) + "Force Vi state in VC diff buffer." + (viper-change-state-to-vi))) (eval-after-load "emerge" '(defadvice emerge-quit (after viper-emerge-advice activate) "Run `viper-change-state-to-vi' after quitting emerge." (viper-change-state-to-vi))) - ;; In case Emerge was loaded before Viper. - (defadvice emerge-quit (after viper-emerge-advice activate) - "Run `viper-change-state-to-vi' after quitting emerge." - (viper-change-state-to-vi)) ;; passwd.el sets up its own buffer, which turns up in Vi mode, ;; thus overriding the local map. We don't need Vi mode here. @@ -943,10 +935,6 @@ It also can't undo some Viper settings." '(defadvice rmail-cease-edit (after viper-rmail-advice activate) "Switch to Emacs state when done editing message." (viper-change-state-to-emacs))) - ;; In case RMAIL was loaded before Viper. - (defadvice rmail-cease-edit (after viper-rmail-advice activate) - "Switch to emacs state when done editing message." - (viper-change-state-to-emacs)) ;; ISO accents ;; Need to do it after loading iso-acc, or else this loading will wipe out